package com.beesphere.excel.reader.tests;

import java.io.FileInputStream;
import java.nio.charset.Charset;

import com.beesphere.excel.reader.impls.xml.ExcelToXmlConverter;

public class EmptyCellsTest {
	public static void main (String [] args) throws Exception {
		ExcelToXmlConverter reader = new ExcelToXmlConverter () {
			private static final long serialVersionUID = 2209366036214032583L;

			@Override
			public int[] getSheetColumnsIndexes(int sheetIndex) {
				int [] columnsIndexes = new int [9];
				for (int i = 0; i < 9; i++) {
					columnsIndexes[i] = i;
				}
				return columnsIndexes;
			}

			@Override
			public boolean isSheetWithHeader(int sheetIndex) {
				return true;
			}
		};
		reader.setSheetIndex(0);
		reader.setIgnoreEmptyCells(true);
		reader.setCharset (Charset.forName("ISO-8859-1"));
		reader.read (new FileInputStream ("files/in.xls"));
	}
}
